using System;
using System.Collections;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Web;
using System.Web.SessionState;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.HtmlControls;

namespace Forum
{
	/// <summary>
	/// Summary description for WebForm1.
	/// </summary>
	public class Forum : System.Web.UI.Page
	{
		protected System.Web.UI.HtmlControls.HtmlGenericControl contentDiv;
		protected System.Web.UI.HtmlControls.HtmlGenericControl logoDiv;
		protected System.Web.UI.HtmlControls.HtmlGenericControl treeDiv;
		protected System.Web.UI.HtmlControls.HtmlGenericControl Div1;
		protected System.Web.UI.HtmlControls.HtmlGenericControl Div2;
		protected System.Web.UI.HtmlControls.HtmlGenericControl content2Div;
		protected System.Web.UI.HtmlControls.HtmlGenericControl Div3;
		protected System.Web.UI.HtmlControls.HtmlGenericControl Div4;
		
		protected System.Data.SqlClient.SqlConnection sqlConnection1;
	
		private void Page_Load(object sender, System.EventArgs e)
		{
            if (Session["Id"] == null || Session["Id"].ToString() =="") 
            {
                Session["Id"] = 1;
            }
            if (Session["lang"] == null || Session["lang"].ToString() == "")
            {
                Session["lang"] = "EN";
                Session["dir"] = "ltr";
            }

            MessageBoard.User currentUser = MessageBoard.User.Get(int.Parse(Session["Id"].ToString()));
            MessageBoard.Language currentLanguage = MessageBoard.Language.Get(Session["lang"].ToString());

            String pageName = "Forum.aspx";

            // GroupList
            if (Request.QueryString["Forum"] == null || Request.QueryString["Forum"] == "GroupList")
            {
                MessageBoardControl.GroupList groupList = new MessageBoardControl.GroupList();
                groupList.URL = pageName + "?";
                groupList.MessageBoardSecurityUrl = pageName + "?";
                groupList.GroupSecurityUrl = pageName + "?";
                groupList.AddURL = pageName + "?";
                groupList.EditURL = pageName + "?";
                groupList.DeleteURL = pageName + "?";
                groupList.CurrentUser = currentUser;
                groupList.ImagesFolder = "Images/Forum";
                groupList.Language = currentLanguage;
                contentDiv.Controls.Add(groupList);

                MessageBoardControl.Tree tree = new MessageBoardControl.Tree();
                tree.ImagesFolder = "Images/Forum";
                tree.URLMessageBoard = pageName;
                tree.Language = currentLanguage;
                treeDiv.Controls.Add(tree);
            }

            // AddGroup
            if (Request.QueryString["Forum"] == "AddGroup")
            {
                MessageBoardControl.AddGroup addGroup = new MessageBoardControl.AddGroup();
                addGroup.URLAfter = pageName;
                addGroup.CurrentUser = currentUser;
                addGroup.Language = currentLanguage;
                contentDiv.Controls.Add(addGroup);

                MessageBoardControl.Tree tree = new MessageBoardControl.Tree();
                tree.ImagesFolder = "Images/Forum";
                tree.URLMessageBoard = pageName;
                tree.Language = currentLanguage;
                treeDiv.Controls.Add(tree);
            }

            //EditGroup
            if (Request.QueryString["Forum"] == "EditGroup")
            {
                MessageBoardControl.EditGroup editGroup = new MessageBoardControl.EditGroup();
                editGroup.Group = MessageBoard.Group.Get(int.Parse(Request.QueryString["GroupId"]));
                editGroup.URLAfter = pageName;
                editGroup.Language = currentLanguage;
                contentDiv.Controls.Add(editGroup);

                MessageBoardControl.Tree tree = new MessageBoardControl.Tree();
                tree.ImagesFolder = "Images/Forum";
                tree.URLMessageBoard = pageName;
                tree.Language = currentLanguage;
                treeDiv.Controls.Add(tree);
            }

        ////DeleteGroup
        //If Request.QueryString("Forum") = "DeleteGroup" Then
        //    Dim deleteGroup As MessageBoardControl.DeleteGroup = New MessageBoardControl.DeleteGroup
        //    deleteGroup.Group = MessageBoard.Group.Get(CInt(Request.QueryString("GroupId")))
        //    deleteGroup.URLAfter = pageName
        //    deleteGroup.Language = currentLanguage
        //    contentDiv.Controls.Add(deleteGroup)

        //    Dim tree As MessageBoardControl.Tree = New MessageBoardControl.Tree
        //    tree.ImagesFolder = "Images/Forum"
        //    tree.URLMessageBoard = pageName
        //    tree.Language = currentLanguage
        //    treeDiv.Controls.Add(tree)
        //End If

            //CategoryList
            if (Request.QueryString["Forum"] == "CategoryList")
            {
                MessageBoardControl.CategoryList categoryList = new MessageBoardControl.CategoryList();
                categoryList.URL = pageName + "?";
                categoryList.Group = MessageBoard.Group.Get(int.Parse(Request.QueryString["GroupId"]));
                categoryList.CurrentUser = currentUser;
                categoryList.ImagesFolder = "Images/Forum";
                categoryList.CategorySecurityUrl = pageName + "?";
                categoryList.ForumSecurityUrl = pageName + "?";
                categoryList.AddCategoryURL = pageName + "?";
                categoryList.EditCategoryURL = pageName + "?";
                categoryList.DeleteCategoryURL = pageName + "?";
                categoryList.AddForumURL = pageName + "?";
                categoryList.EditForumURL = pageName + "?";
                categoryList.DeleteForumURL = pageName + "?";
                categoryList.Language = currentLanguage;
                contentDiv.Controls.Add(categoryList);

                MessageBoardControl.Tree tree = new MessageBoardControl.Tree();
                tree.ImagesFolder = "Images/Forum";
                tree.Group = MessageBoard.Group.Get(int.Parse(Request.QueryString["GroupId"]));
                tree.URLMessageBoard = pageName + "?GroupId=" + tree.Group.Id;
                tree.Language = currentLanguage;
                treeDiv.Controls.Add(tree);
            }

        ////AddCategory
        //If Request.QueryString("Forum") = "AddCategory" Then
        //    Dim addCategory As MessageBoardControl.AddCategory = New MessageBoardControl.AddCategory
        //    addCategory.URLAfter = pageName + "?Forum=CategoryList&GroupId=" & Request.QueryString("GroupId")
        //    addCategory.Group = MessageBoard.Group.Get(CInt(Request.QueryString("GroupId")))
        //    addCategory.Language = currentLanguage
        //    addCategory.CurrentUser = currentUser
        //    contentDiv.Controls.Add(addCategory)

        //    Dim tree As MessageBoardControl.Tree = New MessageBoardControl.Tree
        //    tree.ImagesFolder = "Images/Forum"
        //    tree.URLMessageBoard = pageName
        //    tree.Group = MessageBoard.Group.Get(CInt(Request.QueryString("GroupId")))
        //    tree.URLGroup = pageName + "?GroupId=" & tree.Group.Id
        //    tree.Language = currentLanguage
        //    treeDiv.Controls.Add(tree)
        //End If

        //// EditCategory
        //If Request.QueryString("Forum") = "EditCategory" Then
        //    Dim editCategory As MessageBoardControl.EditCategory = New MessageBoardControl.EditCategory
        //    editCategory.URLAfter = pageName + "?Forum=CategoryList&GroupId=" & Request.QueryString("GroupId")
        //    editCategory.Category = MessageBoard.Category.Get(CInt(Request.QueryString("CategoryId")))
        //    editCategory.Language = currentLanguage
        //    editCategory.CurrentUser = currentUser
        //    contentDiv.Controls.Add(editCategory)

        //    Dim tree As MessageBoardControl.Tree = New MessageBoardControl.Tree
        //    tree.ImagesFolder = "Images/Forum"
        //    tree.URLMessageBoard = pageName
        //    tree.Group = MessageBoard.Category.Get(CInt(Request.QueryString("CategoryId"))).Group
        //    tree.URLGroup = pageName + "?GroupId=" & tree.Group.Id
        //    tree.Language = currentLanguage
        //    treeDiv.Controls.Add(tree)
        //End If

        //// Delete Category
        //If Request.QueryString("Forum") = "DeleteCategory" Then
        //    Dim deleteCategory As MessageBoardControl.DeleteCategory = New MessageBoardControl.DeleteCategory
        //    deleteCategory.URLAfter = pageName + "?Forum=CategoryList&GroupId=" & Request.QueryString("GroupId")
        //    deleteCategory.Category = MessageBoard.Category.Get(CInt(Request.QueryString("CategoryId")))
        //    deleteCategory.Language = currentLanguage
        //    contentDiv.Controls.Add(deleteCategory)

        //    Dim tree As MessageBoardControl.Tree = New MessageBoardControl.Tree
        //    tree.ImagesFolder = "Images/Forum"
        //    tree.URLMessageBoard = pageName
        //    tree.Group = MessageBoard.Category.Get(CInt(Request.QueryString("CategoryId"))).Group
        //    tree.URLGroup = pageName + "?GroupId=" & tree.Group.Id
        //    tree.Language = currentLanguage
        //    treeDiv.Controls.Add(tree)
        //End If

        //// AddForum
        //If Request.QueryString("Forum") = "AddForum" Then
        //    Dim addForum As MessageBoardControl.AddForum = New MessageBoardControl.AddForum
        //    addForum.Category = MessageBoard.Category.Get(CInt(Request.QueryString("CategoryId")))
        //    addForum.CurrentUser = currentUser
        //    addForum.URLAfter = pageName + "?Forum=CategoryList&GroupId=" & addForum.Category.Group.Id.ToString()
        //    addForum.Language = currentLanguage
        //    contentDiv.Controls.Add(addForum)

        //    Dim tree As MessageBoardControl.Tree = New MessageBoardControl.Tree
        //    tree.ImagesFolder = "Images/Forum"
        //    tree.Group = addForum.Category.Group
        //    tree.URLMessageBoard = pageName
        //    tree.URLGroup = pageName + "?GroupId=" & tree.Group.Id
        //    tree.Language = currentLanguage
        //    treeDiv.Controls.Add(tree)
        //End If

        //// EditForum
        //If Request.QueryString("Forum") = "EditForum" Then
        //    Dim editForum As MessageBoardControl.EditForum = New MessageBoardControl.EditForum
        //    editForum.URLAfter = pageName + "?Forum=CategoryList&GroupId=" & Request.QueryString("GroupId")
        //    editForum.Forum = MessageBoard.Forum.Get(CInt(Request.QueryString("ForumId")))
        //    editForum.Language = currentLanguage
        //    contentDiv.Controls.Add(editForum)

        //    Dim tree As MessageBoardControl.Tree = New MessageBoardControl.Tree
        //    tree.ImagesFolder = "Images/Forum"
        //    tree.Group = editForum.Forum.Category.Group
        //    tree.URLMessageBoard = pageName
        //    tree.URLGroup = pageName + "?GroupId=" & tree.Group.Id
        //    tree.Language = currentLanguage
        //    treeDiv.Controls.Add(tree)
        //End If

        //// DeleteForum
        //If Request.QueryString("Forum") = "DeleteForum" Then
        //    Dim deleteForum As MessageBoardControl.DeleteForum = New MessageBoardControl.DeleteForum
        //    deleteForum.URLAfter = pageName + "?Forum=CategoryList&GroupId=" & Request.QueryString("GroupId")
        //    deleteForum.Forum = MessageBoard.Forum.Get(CInt(Request.QueryString("ForumId")))
        //    deleteForum.Language = currentLanguage
        //    contentDiv.Controls.Add(deleteForum)

        //    Dim tree As MessageBoardControl.Tree = New MessageBoardControl.Tree
        //    tree.ImagesFolder = "Images/Forum"
        //    tree.Group = deleteForum.Forum.Category.Group
        //    tree.URLMessageBoard = pageName
        //    tree.URLGroup = pageName + "?GroupId=" & tree.Group.Id
        //    tree.Language = currentLanguage
        //    treeDiv.Controls.Add(tree)
        //End If

        // ThreadList
        if (Request.QueryString["Forum"] == "ThreadList")
        {
            MessageBoardControl.ThreadList threadList = new MessageBoardControl.ThreadList();
            threadList.URL = pageName + "?";
            threadList.ForumId = int.Parse(Request.QueryString["ForumId"]);
            threadList.CurrentUser = currentUser;
            threadList.ImagesFolder = "Images/Forum";
            threadList.Language = currentLanguage;
            contentDiv.Controls.Add(threadList);

            MessageBoardControl.AddThread addThread = new MessageBoardControl.AddThread();
            addThread.URLAfter = pageName + "?Forum=ThreadList&ForumId=" + Request.QueryString["ForumId"];
            addThread.Forum = MessageBoard.Forum.Get(int.Parse(Request.QueryString["ForumId"]));
            addThread.ImagesFolder = "Images/Forum";
            addThread.CurrentUser = currentUser;
            addThread.Language = currentLanguage;
            content2Div.Controls.Add(addThread);

            MessageBoardControl.Tree tree = new MessageBoardControl.Tree();
            tree.ImagesFolder = "Images/Forum";
            tree.Forum = MessageBoard.Forum.Get(int.Parse(Request.QueryString["ForumId"]));
            tree.URLMessageBoard = pageName;
            tree.URLGroup = pageName + "?Forum=CategoryList&GroupId=" + tree.Forum.Category.Group.Id;
            tree.URLCategory = pageName + "?";
            tree.URLForum = pageName + "?";
            tree.Language = currentLanguage;
            treeDiv.Controls.Add(tree);
        }

        //// EditThread
        //If Request.QueryString("Forum") = "EditThread" Then
        //    Dim editThread As MessageBoardControl.EditThread = New MessageBoardControl.EditThread
        //    editThread.URLAfter = pageName + "?Forum=PostList&ThreadId=" & Request.QueryString("ThreadId")
        //    editThread.Thread = MessageBoard.Thread.Get(CInt(Request.QueryString("ThreadId")))
        //    editThread.ImagesFolder = "Images/Forum"
        //    editThread.CurrentUser = currentUser
        //    editThread.Language = currentLanguage
        //    content2Div.Controls.Add(editThread)

        //    Dim tree As MessageBoardControl.Tree = New MessageBoardControl.Tree
        //    tree.ImagesFolder = "Images/Forum"
        //    tree.Thread = editThread.Thread
        //    tree.URLMessageBoard = pageName
        //    tree.URLGroup = pageName + "?Forum=CategoryList&GroupId=" & tree.Thread.Forum.Category.Group.Id
        //    tree.URLCategory = pageName + "?"
        //    tree.URLForum = pageName + "?Forum=ThreadList&ForumId=" & tree.Thread.Forum.Id
        //    tree.Language = currentLanguage
        //    treeDiv.Controls.Add(tree)
        //End If

        //// DeleteThread
        //If Request.QueryString("Forum") = "DeleteThread" Then
        //    Dim deleteThread As MessageBoardControl.DeleteThread = New MessageBoardControl.DeleteThread
        //    Dim thread As MessageBoard.Thread = MessageBoard.Thread.Get(CInt(Request.QueryString("ThreadId")))
        //    deleteThread.URLAfter = pageName + "?Forum=ThreadList&ForumId=" & thread.Forum.Id
        //    deleteThread.Thread = thread
        //    deleteThread.CurrentUser = currentUser
        //    deleteThread.Language = currentLanguage
        //    content2Div.Controls.Add(deleteThread)

        //    Dim tree As MessageBoardControl.Tree = New MessageBoardControl.Tree
        //    tree.ImagesFolder = "Images/Forum"
        //    tree.Thread = thread
        //    tree.URLMessageBoard = pageName
        //    tree.URLGroup = pageName + "?Forum=CategoryList&GroupId=" & tree.Thread.Forum.Category.Group.Id
        //    tree.URLCategory = pageName + "?"
        //    tree.URLForum = pageName + "?Forum=ThreadList&ForumId=" & tree.Thread.Forum.Id
        //    tree.Language = currentLanguage
        //    treeDiv.Controls.Add(tree)
        //End If

        //// LockThread
        //If Request.QueryString("Forum") = "LockThread" Then
        //    Dim lockThread As MessageBoardControl.LockThread = New MessageBoardControl.LockThread
        //    lockThread.URLAfter = pageName & "?Forum=PostList&ThreadId=" & Request.QueryString("ThreadId")
        //    lockThread.Thread = MessageBoard.Thread.Get(CInt(Request.QueryString("ThreadId")))
        //    lockThread.CurrentUser = currentUser
        //    lockThread.Language = currentLanguage
        //    content2Div.Controls.Add(lockThread)

        //    Dim tree As MessageBoardControl.Tree = New MessageBoardControl.Tree
        //    tree.ImagesFolder = "Images/Forum"
        //    tree.Thread = lockThread.Thread
        //    tree.URLMessageBoard = pageName
        //    tree.URLGroup = pageName + "?Forum=CategoryList&GroupId=" & tree.Thread.Forum.Category.Group.Id
        //    tree.URLCategory = pageName + "?"
        //    tree.URLForum = pageName + "?Forum=ThreadList&ForumId=" & tree.Thread.Forum.Id
        //    tree.Language = currentLanguage
        //    treeDiv.Controls.Add(tree)
        //End If

        // PostList
        if (Request.QueryString["Forum"] == "PostList")
        {
            MessageBoard.Thread thread = MessageBoard.Thread.Get(int.Parse(Request.QueryString["ThreadId"]));
            MessageBoardControl.PostList postList = new MessageBoardControl.PostList();
            postList.URL = pageName + "?";
            postList.PostSecurityUrl = pageName + "?";
            postList.EditThreadURL = pageName + "?";
            postList.DeleteThreadURL = pageName + "?";
            postList.EditPostURL = pageName + "?";
            postList.DeletePostURL = pageName + "?";
            postList.LockThreadURL = pageName + "?";
            postList.Thread = thread;
            postList.CurrentUser = currentUser;
            postList.EmotionsFolder = "Images/Emotions";
            postList.ImagesFolder = "Images/Forum";
            postList.ViewDisplayImages = true;
            postList.DisplayImagesFolder = "Images/DisplayImages";
            postList.Language = currentLanguage;
            contentDiv.Controls.Add(postList);

            MessageBoardControl.AddPost addPost = new MessageBoardControl.AddPost();
            addPost.URLAfter = pageName + "?Forum=PostList&ThreadId=" + Request.QueryString["ThreadId"];
            addPost.Thread = MessageBoard.Thread.Get(int.Parse(Request.QueryString["ThreadId"]));
            addPost.CurrentUser = currentUser;
            addPost.Language = currentLanguage;
            content2Div.Controls.Add(addPost);

            MessageBoardControl.Tree tree = new MessageBoardControl.Tree();
            tree.ImagesFolder = "Images/Forum";
            tree.Thread = thread;
            tree.URLMessageBoard = pageName;
            tree.URLGroup = pageName + "?Forum=CategoryList&GroupId=" + tree.Thread.Forum.Category.Group.Id;
            tree.URLCategory = pageName + "?";
            tree.URLForum = pageName + "?Forum=ThreadList&ForumId=" + tree.Thread.Forum.Id;
            tree.Language = currentLanguage;
            treeDiv.Controls.Add(tree);
        }

        //// EditPost
        //If Request.QueryString("Forum") = "EditPost" Then
        //    Dim post As MessageBoard.Post = MessageBoard.Post.Get(CInt(Request.QueryString("PostId")))
        //    Dim editPost As MessageBoardControl.EditPost = New MessageBoardControl.EditPost
        //    editPost.URLAfter = pageName + "?Forum=PostList&ThreadId=" & post.Thread.Id
        //    editPost.Post = post
        //    editPost.CurrentUser = currentUser
        //    editPost.Language = currentLanguage
        //    contentDiv.Controls.Add(editPost)

        //    Dim tree As MessageBoardControl.Tree = New MessageBoardControl.Tree
        //    tree.ImagesFolder = "Images/Forum"
        //    tree.Thread = post.Thread
        //    tree.URLMessageBoard = pageName
        //    tree.URLGroup = pageName + "?Forum=CategoryList&GroupId=" & tree.Thread.Forum.Category.Group.Id
        //    tree.URLCategory = pageName + "?"
        //    tree.URLForum = pageName + "?Forum=ThreadList&ForumId=" & tree.Thread.Forum.Id
        //    tree.Language = currentLanguage
        //    treeDiv.Controls.Add(tree)
        //End If

        //// DeletePost
        //If Request.QueryString("Forum") = "DeletePost" Then
        //    Dim post As MessageBoard.Post = MessageBoard.Post.Get(CInt(Request.QueryString("PostId")))
        //    Dim deletePost As MessageBoardControl.DeletePost = New MessageBoardControl.DeletePost
        //    deletePost.URLAfter = pageName + "?Forum=PostList&ThreadId=" & post.Thread.Id
        //    deletePost.Post = post
        //    deletePost.CurrentUser = currentUser
        //    deletePost.Language = currentLanguage
        //    contentDiv.Controls.Add(deletePost)

        //    Dim tree As MessageBoardControl.Tree = New MessageBoardControl.Tree
        //    tree.ImagesFolder = "Images/Forum"
        //    tree.Thread = post.Thread
        //    tree.URLMessageBoard = pageName
        //    tree.URLGroup = pageName + "?Forum=CategoryList&GroupId=" & tree.Thread.Forum.Category.Group.Id
        //    tree.URLCategory = pageName + "?"
        //    tree.URLForum = pageName + "?Forum=ThreadList&ForumId=" & tree.Thread.Forum.Id
        //    tree.Language = currentLanguage
        //    treeDiv.Controls.Add(tree)
        //End If

        //// ManageSecurity
        //If Request.QueryString("Forum") = "ManageSecurity" Then
        //    Dim manageSecurity As MessageBoardControl.ManageSecurity = New MessageBoardControl.ManageSecurity
        //    manageSecurity.URLAfter = pageName + "?Forum=GroupList"
        //    manageSecurity.Language = currentLanguage
        //    Dim tree As MessageBoardControl.Tree = New MessageBoardControl.Tree
        //    If Request.QueryString("GroupId") <> "" Then
        //        manageSecurity.URLAfter = pageName + "?Forum=GroupList"
        //        manageSecurity.Group = MessageBoard.Group.Get(CInt(Request.QueryString("GroupId").ToString()))
        //    ElseIf Request.QueryString("CategoryId") <> "" Then
        //        manageSecurity.Category = MessageBoard.Category.Get(CInt(Request.QueryString("CategoryId").ToString()))
        //        manageSecurity.URLAfter = pageName + "?Forum=CategoryList&GroupId=" & manageSecurity.Category.Group.Id
        //    ElseIf Request.QueryString("ForumId") <> "" Then
        //        manageSecurity.Forum = MessageBoard.Forum.Get(CInt(Request.QueryString("ForumId").ToString()))
        //        manageSecurity.URLAfter = pageName + "?Forum=CategoryList&GroupId=" & manageSecurity.Forum.Category.Group.Id
        //    ElseIf Request.QueryString("ThreadId") <> "" Then
        //        manageSecurity.Thread = MessageBoard.Thread.Get(CInt(Request.QueryString("ThreadId").ToString()))
        //        manageSecurity.URLAfter = pageName + "?Forum=ThreadList&ForumId=" & manageSecurity.Thread.Forum.Id
        //        tree.Thread = manageSecurity.Thread
        //        tree.URLGroup = pageName + "?Forum=CategoryList&GroupId=" & tree.Thread.Forum.Category.Group.Id
        //        tree.URLCategory = pageName + "?"
        //        tree.URLForum = pageName + "?Forum=ThreadList&ForumId=" & tree.Thread.Forum.Id
        //    ElseIf Request.QueryString("PostId") <> "" Then
        //        manageSecurity.Post = MessageBoard.Post.Get(CInt(Request.QueryString("PostId").ToString()))
        //        manageSecurity.URLAfter = pageName + "?Forum=PostList&ThreadId=" & manageSecurity.Post.Thread.Id
        //        tree.Thread = manageSecurity.Post.Thread
        //        tree.URLGroup = pageName + "?Forum=CategoryList&GroupId=" & tree.Thread.Forum.Category.Group.Id
        //        tree.URLCategory = pageName + "?"
        //        tree.URLForum = pageName + "?Forum=ThreadList&ForumId=" & tree.Thread.Forum.Id
        //    End If
        //    contentDiv.Controls.Add(manageSecurity)


        //    tree.ImagesFolder = "Images/Forum"
        //    tree.URLMessageBoard = pageName
        //    tree.Language = currentLanguage
        //    treeDiv.Controls.Add(tree)

        //    If Request.QueryString("GroupId") <> "" Then
        //        manageSecurity.Group = MessageBoard.Group.Get(CInt(Request.QueryString("GroupId").ToString()))
        //    End If
        //End If


		}

		#region Web Form Designer generated code
		override protected void OnInit(EventArgs e)
		{
			//
			// CODEGEN: This call is required by the ASP.NET Web Form Designer.
			//
			InitializeComponent();
			base.OnInit(e);
		}
		
		/// <summary>
		/// Required method for Designer support - do not modify
		/// the contents of this method with the code editor.
		/// </summary>
		private void InitializeComponent()
		{    
			this.sqlConnection1 = new System.Data.SqlClient.SqlConnection();
			// 
			// sqlConnection1
			// 
			this.sqlConnection1.ConnectionString = "workstation id=OSAMA;packet size=4096;user id=forumuser;data source=osama;persist" +
				" security info=True;initial catalog=Forum;password=forumpass";
			this.Load += new System.EventHandler(this.Page_Load);

		}
		#endregion
	}
}
